<!DOCTYPE html>
<html>
	<head>
		<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="../../css/iuapmobile.um.css">
		<link rel="stylesheet" href="../../css/font-icons.css">
		<link rel="stylesheet" href="../../css/iscroll.css" />
		<script src="../../js/summer.js" ></script>
		<script src="../../js/jquery.min.js" ></script>
		<script src="../../js/iscroll.js"></script>
		<script src="../../js/Frameworks/iuapmobile.frameworks.ui.js" ></script>
		<script type="text/javascript" src="../../js/knockout.js"></script>

		<script>
			function $pageReady() {
				/*这里编写与原生服务相关的代码逻辑，例如对原生设备服务的调用，对网络服务的调用等*/
				//alert("Mobile Native Ready");
			}

			$(function() {

			});
		</script>
		<style>
			.self {
				border-bottom: 1px solid RGB(238,238,238);
				padding: 0;
				margin: 0 0 0 15px
			}
			.self span {
				margin-right: 15px
			}
			#select1_dummy, #select2_dummy, #select3_dummy {
				border: none;
				padding-left: 10px;
				color: #555;
				font-size: 17px;
				text-align: right;
				margin-right: 20px;
				width: 100%;
			}
			#select1_dummy:disabled, #select2_dummy:disabled, #select3_dummy:disabled {
				background: #fff;
			}
		</style>
	</head>
	<body class="f14">
		<div class="um-win" id="detail" >
			<div class="um-header" >
				<a  class="um-back back">返回</a>
				<h3>拆机详情</h3>
			</div>
			<div class="um-content" id="listview" ng-app="myApp" ng-controller="myCtrl">
				<ul class="um-list">
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl15">
								商家编号:
							</div>
							<div class="um-list-item-right">
								<span ng-model="sjbh1">{{sjbh1}}</span>
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl15">
								商家经营名称:
							</div>
							<div class="um-list-item-right">
								<span ng-model="sjjymc1">{{sjjymc1}}</span>
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl15">
								商家经营地址:
							</div>
							<div class="um-list-item-right">
								<span ng-model="sjjydz1">{{sjjydz1}}</span>
							</div>
						</div>
					</li>
					<!--<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					经度:
					</div>
					<div class="um-list-item-right">
					<span ng-model="jd1">{{jd1}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					纬度:
					</div>
					<div class="um-list-item-right">
					<span ng-model="wd1">{{wd1}}</span>
					</div>
					</div>
					</li>-->
					<!--<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					店面负责人:
					</div>
					<div class="um-list-item-right">
					<span ng-model="dmfzr1_name">{{dmfzr1_name}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					联系方式:
					</div>
					<div class="um-list-item-right">
					<span ng-model="lxfs1_name">{{lxfs1_name}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					经营类型:
					</div>
					<div class="um-list-item-right">
					<span ng-model="jylx1_name">{{jylx1_name}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					经营面积:
					</div>
					<div class="um-list-item-right">
					<span ng-model="jymj1">{{jymj1}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					所属商圈:
					</div>
					<div class="um-list-item-right">
					<span ng-model="sssq1">{{sssq1}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					所属环线:
					</div>
					<div class="um-list-item-right">
					<span ng-model="sshx1_name">{{sshx1_name}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					是否联网:
					</div>
					<div class="um-list-item-right">
					<span ng-model="sflw1">{{sflw1}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					省:
					</div>
					<div class="um-list-item-right">
					<span ng-model="shen1_name">{{shen1_name}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					市:
					</div>
					<div class="um-list-item-right">
					<span ng-model="shi1_name">{{shi1_name}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					区:
					</div>
					<div class="um-list-item-right">
					<span ng-model="qu1_name">{{qu1_name}}</span>
					</div>
					</div>
					</li>-->
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl15">
								门头照:
							</div>
							<div class="um-list-item-right">
								<img width="50"  alt="" class="lookimg" ng-model="mtz1" src="{{mtz1}}" />
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl15">
								远景照:
							</div>
							<div class="um-list-item-right">
								<img  width="50" alt=""  class="lookimg"  ng-model="yjz1" src="{{yjz1}}"/>
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl15">
								近景照:
							</div>
							<div class="um-list-item-right">
								<img width="50"  alt="" class="lookimg"  ng-model="jjz1" src="{{jjz1}}" />
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl15">
								全景照:
							</div>
							<div class="um-list-item-right">
								<img width="50" alt="" class="lookimg"  ng-model="qjz1" src="{{qjz1}}" />
							</div>
						</div>
					</li>
					<!--<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					开店时间:
					</div>
					<div class="um-list-item-right">
					<span ng-model="kdsj1">{{kdsj1}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					闭店时间:
					</div>
					<div class="um-list-item-right">
					<span ng-model="bdsj1">{{bdsj1}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					签约人员:
					</div>
					<div class="um-list-item-right">
					<span ng-model="qyry1_name">{{qyry1_name}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					所属部门:
					</div>
					<div class="um-list-item-right">
					<span ng-model="ssbm1_name">{{ssbm1_name}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					签约日期:
					</div>
					<div class="um-list-item-right">
					<span ng-model="qyrq1">{{qyrq1}}</span>
					</div>
					</div>
					</li>
					<!--<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					签约时间:
					</div>
					<div class="um-list-item-right">
					<span ng-model="qysj1">{{qysj1}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					设备数量:
					</div>
					<div class="um-list-item-right">
					<span ng-model="sbsl1">{{sbsl1}}</span>
					</div>
					</div>
					</li>-->
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl15">
								点位编号:
							</div>
							<div class="um-list-item-right">
								<span ng-model="dwbh1">{{dwbh1}}</span>
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl15">
								设备类型:
							</div>
							<div class="um-list-item-right">
								<span ng-model="sblx1_name">{{sblx1_name}}</span>
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl15">
								安装方式:
							</div>
							<div class="um-list-item-right">
								<span ng-model="azfs1_name">{{azfs1_name}}</span>
							</div>
						</div>
					</li>
					<li class="um-list-item">
						<div class="um-list-item-inner">
							<div class="um-list-item-left pl15">
								摄像机数量:
							</div>
							<div class="um-list-item-right">
								<span ng-model="sxjsl1">{{sxjsl1}}</span>
							</div>
						</div>
					</li>
					<!--<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					审核人员:
					</div>
					<div class="um-list-item-right">
					<span ng-model="shry1_name">{{shry1_name}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					点位审核日期:
					</div>
					<div class="um-list-item-right">
					<span ng-model="dwshrq1">{{dwshrq1}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					点位审核时间:
					</div>
					<div class="um-list-item-right">
					<span ng-model="dwshsj1">{{dwshsj1}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					点位审核结果:
					</div>
					<div class="um-list-item-right">
					<span ng-model="dwshjg1_name">{{dwshjg1_name}}</span>
					</div>
					</div>
					</li>-->
					<!--<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					派工日期:
					</div>
					<div class="um-list-item-right">
					<span ng-model="pgrq1">{{pgrq1}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					派工时间:
					</div>
					<div class="um-list-item-right">
					<span ng-model="pgsj1">{{pgsj1}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					要求竣工日期:
					</div>
					<div class="um-list-item-right">
					<span ng-model="yqjgrq1">{{yqjgrq1}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					施工单位:
					</div>
					<div class="um-list-item-right">
					<span ng-model="sgdw1_name">{{sgdw1_name}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					工程主管:
					</div>
					<div class="um-list-item-right">
					<span ng-model="gczg1_name">{{gczg1_name}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					加急类型:
					</div>
					<div class="um-list-item-right">
					<span ng-model="jjlx1">{{jjlx1}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					层高:
					</div>
					<div class="um-list-item-right">
					<span ng-model="cg1">{{cg1}}</span>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<span class="h pa um-box-vc um-red f20 pl5" >*</span>
					<div class="um-list-item-left pl15">
					设备签收人:
					</div>
					<div class="um-list-item-right">
					<select id='select1' class="select" >
					<option ng-repeat="i in persion">{{i}}</option>
					</select>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<span class="h pa um-box-vc um-red f20 pl5" >*</span>
					<div class="um-list-item-left pl15">
					施工执行人:
					</div>
					<div class="um-list-item-right">
					<select id='select2' class="select" >
					<option ng-repeat="r in installer">{{r}}</option>
					</select>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					验收人:
					</div>
					<div class="um-list-item-right">
					<select id='select3' class="select" >
					<option ng-repeat="k in accepter">{{k}}</option>
					</select>
					</div>
					</div>
					</li>
					<li class="um-list-item">
					<div class="um-list-item-inner">
					<div class="um-list-item-left pl15">
					是否加长装置:
					</div>
					<div class="um-list-item-right">
					<span ng-model="needlong">{{sfxjczz1}}</span>
					</div>
					</div>
					</li>-->
				</ul>

			</div>
			<div class="um-footer">
				<div class="btn-group btn-group-justify">
					<button id="reivcer" type="button" class="um-btn" onclick="checkwork();">
						施工完成填报
					</button>
				</div>
			</div>
		</div>
		<script src="https://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
		<script type="text/javascript">
			var imgs = new Array();
			var openCameraObj;
			var anscope;
			var sxjsl1;
			var bodyid;
			var billcode;
			var selectdatas;
			var persions = new Array();
			/**
			 *初始化选择控件
			 */
			$(function() {
				// var curr = new Date().getFullYear();
				var opt = {
					'date' : {
						preset : 'date'
					},
					'select' : {
						preset : 'select'
					}
				};
				$('.select').scroller('destroy').scroller($.extend(opt['select'], {
					theme : "ios7",
					mode : "scroller",
					display : "bottom",
					animate : ""
				}));
			});

			//默认相机图片位置
			var defaultSrc = "../../img/myimg/camera.png";

			/**
			 *权限设置
			 */

			//相机打开

			var changeImgobj;
			function openCamera(obj) {
				changeImgobj = obj;
				summer.openCamera({
					compressionRatio : 0.8,
					callback : function(args) {
						UM.showLoadingBar({
							text : "请稍等",
							icons : 'ti-reload',
						});
						//imgPath
						getBase64Image(args.compressImgPath, function(dat) {
							summer.openWin({
								id : "rotateImg",
								url : "html/all/rotateImg.html",
								isKeep : true,
								pageParam : {
									id : obj.id, //编号
									base64 : dat, //base64
									pageId : "shangjiatuozhan" //page ID
								}
							});
							UM.hideLoadingBar();
						}, 1);
					}
				});
			}

			function rotateBack(obj) {
				changeImgobj.src = obj.base64;
				imgs[obj.id] = obj.base64;
			}

			/*function bindqianshou(datas) {
			var persiondata = datas.shi1 + "_" + datas.sgdw1;
			doPost(adressHead.ISjtzImpl, "getBdDoc", {
			dataParm : {
			dostype : persiondata
			}
			}, function(jsons) {
			selectdatas = jsons;
			for(var i=0;i<selectdatas.length;i++){
			persions.push(selectdatas[i].doc_name);
			};
			anscope.persion = persions;
			anscope.installer = persions;
			anscope.accepter = persions;
			anscope.$apply();
			$("#select1_dummy").val("请选择");
			$("#select2_dummy").val("请选择");
			$("#select3_dummy").val("请选择");
			}, null, true);

			}*/

			/*$('.select').change(function() {
			$("#" + $(this).attr("id") + "_dummy").val($(this).find("option:selected").text());
			});*/

			/*function getpk(pkname){
			for(var i=0;i<selectdatas.length;i++){
			if(selectdatas[i].doc_name==pkname){
			return selectdatas[i].pk_doc;
			}
			}
			}*/

			/**
			 *接受派工事件处理
			 */
			function checkwork() {
				/*console.log("1");
				 if ($("#select1_dummy").val() == "请选择") {
				 alert("请填写设备签收人");
				 return;
				 }
				 if ($("#select2_dummy").val() == "请选择") {
				 alert("请填写施工执行人");
				 return;
				 }
				 doPost(adressHead.ISjtzImpl, "acceptDispatch", {
				 dataParm : {
				 empId : summer.getStorage('userinfo').empId,
				 bodyid : bodyid.bodyid,
				 status : 4,
				 receiver : getpk($("#select1_dummy").val()),
				 transactor : getpk($("#select2_dummy").val())
				 }
				 }, function(data) {
				 if (data.result == 1) {
				 $("#reivcer").attr({
				 "disabled" : "disabled"
				 });
				 UM.toast({
				 title : '友情提示：',
				 text : data.msg,
				 duration : 1000
				 });
				 setTimeout(function(){
				 summer.execScript({
				 winId: 'install',
				 script: "rebind()"
				 });
				 summer.closeWin();
				 },1000);
				 }
				 }, function(err) {
				 console.log(err);
				 });*/
				summer.openWin({
					id : "inspectsed",
					url : "html/disassemble_Construction/Construction.html",
					/*pageParam : {
						bodyid : bodyid,
						billcode : billcode,
						sxjsl1 : sxjsl1
					}*/
				});
			}

			function binddata(json) {
				console.log(json);
				if (json) {
					for (var i in json) {
						if (json[i] == "N") {
							json[i] = "否";
						}
						if (json[i] == "Y") {
							json[i] = "是";
						}
						if (i == "qyrq1" || i == "pgrq1" || i == "yqjgrq1") {
							json[i] = json[i].substr(0, 10);
						}
						if (i == "pgsj1") {
							json[i] = json[i].substr(11, 18);
						}
						if (json.status >= 2) {
							$("#reivcer").val("已接收派工");
						}
						if (json.receiver) {
							$("#select1_dummy").val(json.receiver);
						}
						if (json.transactor) {
							$("#select2_dummy").val(json.transactor);
						}
						if (i == "mtz1" || i == "yjz1" || i == "jjz1" || i == "qjz1") {
							json[i] = "data:image/jpeg;base64," + json[i];
						}
						anscope[i] = json[i];
					}
					anscope.$apply();
				}
			}

			/**
			 *angular 控件初始化
			 */
			var app = angular.module('myApp', []);
			app.controller('myCtrl', function($scope, $http) {
				anscope = $scope;
				binddata();
			});

			/**
			 *参数初始化
			 */
			summerready = function() {
				/*bodyid = summer.pageParam.bodyid;
				 billcode = summer.pageParam.billcode;
				 doPost(adressHead.ISjtzImpl, "getApdj", {
				 dataParm : {
				 billid : bodyid
				 }
				 }, function(data) {
				 binddata(data.data);
				 sxjsl1 = data.data.sxjsl1;
				 }, function(err) {
				 console.log(err);
				 });
				 $("#select1_dummy").val("请选择");
				 $("#select2_dummy").val("请选择");
				 $("#select3_dummy").val("请选择");*/
				var imgs = document.getElementsByTagName("img");
				for (var i = 0; i < imgs.length; i++) {
					imgs[i].src = defaultSrc;
				}
			}
		</script>
	</body>
</html>
<script type="text/javascript" src="../../js/Myjs/Common.js"></script>